{extend name="public:layout" /}
{block name="title"}添加{$moudleName}{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li>
                    <i class="fa fa-hand-o-right"></i>
                    <a href="{:url('index',['mid'=>$Request.param.mid,'cid'=>$Request.param.cid])}">{$moudleName}列表</a>
                </li>
                <li class="active">添加{$moudleName}</li>
            </ol>
        </div>
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">车牌号</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="车牌号" name="car_sn" value="" datatype="*" />
                    </div>
                    <label class="col-sm-2 control-label Validform_label">车辆型号</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="" name="title" value=""  />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">车辆类型</label>
                    <div class="col-sm-3">
                        {:widget('common/Form/custombox',['car_brand','','widget|common/Form/custombox|select:dict:dict_name,dict_name:type_id=103'])}
                    </div>
                    <label class="col-sm-2 control-label Validform_label">车辆颜色</label>
                    <div class="col-sm-3">
                        {:widget('common/Form/custombox',['car_color','','widget|common/Form/custombox|select:dict:dict_name,dict_name:type_id=104'])}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">座位数</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="座位数" name="car_seat" value="0" datatype="*,s" />
                    </div>
                    <label class="col-sm-2 control-label Validform_label">所属单位</label>
                    <div class="col-sm-3">
                        <input type="text" name="btype_aid" id="select-client" placeholder="请输入客户名称检索" data-init="1" style="width:100%;" value="5" />
                        <script>
                            In('selectpage',function(){
                                $('#select-client').selectPage({
                                    keyField:'aid',
                                    showField:'title',
                                    multiple:false,
                                    pagination:true,
                                    dbTable:'car_btype',
                                    data:'/plus/ajax/selectpage',
                                    andOr:'OR',
                                    params : function(){return {'searchField':'title','btype_type':'1'}},
                                    eAjaxSuccess : function(data){
                                        if(data.totalRow>0){
                                            return data;
                                        }else{
                                            return false;
                                        }
                                    },
                                    formatItem : function(data){
                                        return data.title + '(' + data.btype_phone + ')';
                                    }
                                });
                            })
                        </script>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">轮胎编码(左前)</label>
                    <div class="col-sm-3">
                        <input class="form-control" rows="3" name="shoe1" placeholder="请输入轮胎编码"  />
                    </div>
                    <label class="col-sm-2 control-label Validform_label">轮胎编码(右前)</label>
                    <div class="col-sm-3">
                        <input type="text" class="form-control" placeholder="请输入轮胎编码" name="shoe2"  />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">轮胎编码(左后)</label>
                    <div class="col-sm-3">
                        <input type="text" class="form-control" placeholder="请输入轮胎编码" name="shoe3"  />
                    </div>
                    <label class="col-sm-2 control-label Validform_label">轮胎编码(右后)</label>
                    <div class="col-sm-3">
                        <input type="text" class="form-control" placeholder="请输入轮胎编码" name="shoe4"  />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">车辆里程数</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="请输入车辆初始里程，出车收车后自动更新" name="car_mileage" value=""  />
                    </div>
                    <label class="col-sm-2 control-label Validform_label">车辆油耗</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="车辆油耗" name="car_fue" value="" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">保养公里数</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="保养公里数" name="car_mm" value="0" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">发动机号</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="发动机号" name="car_engine" value=""  />
                    </div>
                    <label class="col-sm-2 control-label Validform_label">车架号</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="车架号" name="car_frame" value=""  />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">车辆状态</label><div class="col-sm-10"><label class="radio-inline i-checks"><input type='radio' name="car_status" value="0" checked/> 可用</label><label class="radio-inline i-checks"><input type='radio' name="car_status" value="1" /> 出车</label><label class="radio-inline i-checks"><input type='radio' name="car_status" value="2" /> 维修</label><label class="radio-inline i-checks"><input type='radio' name="car_status" value="3" /> 保养</label></div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">车辆备注</label>
                    <div class="col-sm-8">
                        <textarea class="form-control" rows="3" name="car_desc" ></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">排序</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="" name="sort" value="0" datatype="*" />
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary" id="btnSub" type="button">保存</button>
                        <a href="{:url('index',['mid'=>$Request.param.mid])}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
        formatDate();
        ajaxSubForm('#btnSub');
    });
</script>
{/block}